FIG. 1 depicts conventional networks 10 and 20 which may be connected to the Internet 30. Each network 10 and 20 includes host 12, 14 and 16 and 22 and 24, respectively. Each network 10 and 20 also includes a switch 18 and 26, respectively, and may include one or more servers such as the servers 17, 19 and 28, respectively. In addition, each network 10 and 20 may include one or more gateways 13 and 25, respectively, to the Internet 30. Not explicitly shown are routers and other portions of the networks 10 and 20 which may also control traffic through the networks 10 and 20 and which will be considered to be inherently depicted by the switches 18 and 26, respectively, and the networks 10 and 20 in general.
In order to manage communications in a network, such as the network 10 or 20, filter rules are used to enforce a plurality of networking rules for multi-field classification searches of the network. Filter rules are typically employed by switches of the network. Exemplary rules include filtering, quality of service, traffic engineering and traffic redirection rules. A filter rule may test packets entering the network from an outside source to ensure that attempts to break into the network can be thwarted. For example, traffic from the Internet 30 entering the network 10 may be tested in order to ensure that packets from unauthorized sources are denied entrance. Similarly, packets from one portion of a network may be prevented from accessing another portion of the network. For example, a packet from some of the hosts 12, 14 or 16 may be prevented access to either the server 17 or the server 19. The fact that the host attempted to contact the server may also be recorded so that appropriate action can be taken by the owner of the network. Filter rules may also be used to transmit traffic based on the priorities of packets. For example, packets from a particular host, such as the host 12, may be transmitted because the packets have higher priority even when packets from the hosts 14 or 16 may be dropped. Filter rules may also be used to ensure that new sessions are not permitted to be started when congestion is high even though traffic from established sessions is transmitted.
Filter rules generally test a packet “key” in order to determine whether the filter rule will operate on a particular packet. The key that is typically used is the Internet Protocol (IP) “five-tuple” of the packet. The IP five-tuple typically contains five fields of interest: the source address, the destination address, the source port, the destination port and the protocol. These fields are typically thirty-two bits, thirty-two bits, sixteen bits, sixteen bits and eight bits, respectively. Thus, the part of IP five-tuple of interest is typically one hundred and four bits in length. Filter rules typically utilize these one hundred and four bits, and possible more bits, in order to perform their functions. For example, based on the source and destination addresses, the filter rule may determine whether a packet from a particular host is allowed to reach a particular destination address.
Filter rules can also interact, based on the priority for the filter rule. For example, a first filter rule may be a default filter rule, which treats most cases. A second filter rule can be an exception the first filter rule. The second filter rule would typically have a higher priority than the first filter rule to ensure that where a packet matches both the first and the second filter rule, the second filter rule will control.
One well known structure for organizing and applying a plurality of filter rules is a “Patricia tree”, wherein Patricia refers to the acronym PATRICIA: Practical Algorithm to Retrieve Information Coded in Alphanumeric. A Patricia tree is a decision tree structure, wherein a “yes” or “no” decision from the application of a first “node” filter rule leads to the responsive selection of one of two sub-tree “branch” filter rules, each of which may serve as a node of two more sub-tree branch filter rule applications, each of which may also serve as another sub-node. One reference for Patricia trees is D. R. Morrison, “PATRICIA—Practical Algorithm to Retrieve Information Coded in Alphanumeric”, Jrnl. of the ACM, 15(4) pp 514-534, October 1968.
With respect to Patricia tree applications in network filter rule management it is known that a balanced tree structure is desired in order to minimize the depth of the tree, and thus minimize search times. U.S. Pat. No. 6,473,763 to Corl, Jr. et al for “System, Method and Computer Program for Filtering Multi-Action Rule Set” issued Oct. 29, 2002 (the “'763 patent”) describes a method of resolving a Multi-field search key to an associated network management rule (such as, for example filtering, QOS, and redirection rules). The '763 patent teaches a “choice bit” algorithm for optimally select distinguishing bits while building a tree structure with an optimum balance, thus minimizing the number of chained pointers (i.e. “depth” of the tree) that must be traversed to resolve a search. The entire tree is rebuilt in a network control plane each time an update is required, the new tree is downloaded to a network data plane, and the data plane is then switched to the new tree while obsolescing the old tree.
This approach works reasonably well for applications requiring infrequent rule changes, for example where a network administrator specifically alters rules to account for an office move. However, processor cycle and bandwidth limits between the control plane and the data plane limit the usefulness of this method when rule changes are more frequent.
What is needed is an improved method and system for handling network filter rule changes that efficiently supports frequent incremental updates to the network filter rules without requiring responsively large network resource commitments, processor cycles and bandwidth.